/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package homework03.by_gong;

import java.util.ArrayList;
import java.util.List;

/**
 *
 *@龚柳彬 2010404108
 */
public class HomeWorkDemo3 {
    private String name;
    private String phone;
    private String cf;

    public HomeWorkDemo3(String name, String phone, String cf) {
        this.name = name;
        this.phone = phone;
        this.cf = cf;
    }

    public String getCf() {
        return cf;
    }

    public void setCf(String dff) {
        this.cf = dff;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public static void set() {
       
    }

    @Override
    public String toString() {
        return this.getName()+" "+this.getPhone()+" "+this.getCf();
    }
}
 class PersonTest {
    public static void main(String[] args) {
        HomeWorkDemo3 person = new HomeWorkDemo3("ZZZ", "12345679", "柳州");
        HomeWorkDemo3 person2 = new HomeWorkDemo3("XXX", "7456464", "柳州");
        HomeWorkDemo3 person3 = new HomeWorkDemo3("CCC", "15616165", "柳州");
        List p = new ArrayList();
        p.add(person);
        p.add(person2);
        p.add(person3);
        System.out.println(p);
    }
}